<?php

namespace app\health\model;

use think\Model;

class HealthCart extends Model
{
    // 表名
    protected $name = 'health_cart';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    /**
     * 定义商品规格相对关联
     * @return void
     * @Author 张旭鹏
     * @DateTime 2023-06-15
     */
    public function goodsAttr()
    {
        return $this->belongsTo(HealthGoodsAttr::class, 'goods_attr_id');
    }
}
